//: polymorphism/PrivateOverride.java
// Trying to override a private method.
package polymorphism;

import static net.mindview.util.Print.*;

public class PrivateOverride {
	private void f() {
		print("private f()");
	}

	public static void main(String[] args) {
		PrivateOverride po = new Derived();
		po.f();
		//输出结果是private f()，因为父类f()是私有函数，即默认为final的，所以父类方法不会被重载
	}
}

class Derived extends PrivateOverride {
	public void f() {
		print("public f()");
	}
} /*
	 * Output: private f()
	 */// :~
